import koa from 'koa';
// import router from 'koa-router';
import JWT from 'koa-jwt';
import compose from 'koa-compose';
import config from '../config/index'
import errorHandler from './common/errorHandler'

const jwt = JWT({ secret: config.JWT_SECRET }).unless({
    path: [
        /\/user/
    ]
})
const middleware = compose([
    errorHandler,
    jwt
]);

const app = new koa();
app.use